package com.example.runningman.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.example.runningman.bean.Steps;

import java.util.List;

@Dao
public interface StepsDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
        //修饰词的作用在于让系统编译的时候自动生成相关的代码
        // BaiduPoints...表示可以传递一个或者多个参数，返回值可以是void或者是long 返回一个插入后的id
    void insertPoints(Steps... Steps);
    @Query("SELECT * FROM steps ")
    List<Steps> selectAllSteps();
    @Query("SELECT count(*) FROM steps ")
    int count();
}
